package com.btpj.module_tree_details.data.remote

import com.btpj.jetpack.http.RetrofitClient
import com.btpj.jetpack.http.api.BaseRepository
import com.btpj.jetpack.entity.ApiResult
import com.btpj.module_tree_details.data.entity.TreeDetail

class TreeDetailRepository(private val retrofitClient: RetrofitClient) : BaseRepository() {

    /**
     * 获取体系详情列表
     */
    suspend fun getTreeDetailList(count: Int, treeDetailId: Int): ApiResult<TreeDetail> {
        return callRequest {
            handleResponse(
                retrofitClient.create(NetApi::class.java)
                    .getTreeDetailsList(count, treeDetailId)
            )
        }
    }
}